package com.xc.tjise.TJISE.day08;

import java.io.File;
import java.sql.Date;
import java.sql.SQLOutput;
import java.util.ArrayList;
import java.util.Arrays;

public class FileTest {
    public static void main(String[] args) {
        File file = new File("D:/");
        System.out.println(file.canRead());
        System.out.println(file.canWrite());
        File newfile = new File("qwe-new.txt");

        System.out.println(file.getAbsoluteFile());
        System.out.println(file.getAbsolutePath());

        System.out.println(file.getName());
        System.out.println(file.getParent());

        System.out.println(file.getParentFile());
        System.out.println(file.getPath());

        System.out.println(file.getTotalSpace()/1024/1024/1024);
        System.out.println(file.getUsableSpace()/1024/1024/1024);


        System.out.println(file.isAbsolute());
        System.out.println(file.isDirectory());
        System.out.println(file.isFile());

        System.out.println(file.isHidden());
        System.out.println(new Date(file.lastModified()));

        System.out.println(Arrays.toString(file.list()));

        File f2 = new File("d2/d22/d222");
        f2.mkdirs();

    }
}
